﻿@model IEnumerable<IRIS.Models.ContentCategory>

@{
    ViewBag.Title = "IRIS Ættleiðingartengd fræðsla : Allir efnisflokkar";
}

<h2>Flokkar</h2>
@if (Model.Count() > 0)
{
    <table>
        <tr>
            <th>
                Nafn
            </th>
            <th>
                Lýsing
            </th>
      
            <th></th>
        </tr>
        
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.ID, delete = false }) |
                    @Html.ActionLink("Delete", "Edit", new { id = item.ID, delete = true })
                </td>
            </tr>
        }
     </table>
}
else
{
    <p>Enginn Flokkur</p>
}


